<?php
	include_once ("../configs/config.php");     //配置参数
	include_once ("../common/mysql.class.php");   //MySQL操作类
	include_once ("../common/action.class.php");   //MySQL操作类
	
	$user_id 	= $_COOKIE['user_id'];
	$db = new action($mydbhost, $mydbuser, $mydbpw, $mydbname, "temp_conn", $mydbcharset, $mydbtag); //实例化数据库类
	$list = $db->get_unread_bottle($user_id);
	$list_length = count($list);
	if($list_length == 0) return;
	$bottle_list = array();
	for($i=0;$i<$list_length;$i++){
		$bottle_id = $list[$i]['bottle_id'];
		$bottleinfo_list = $db->get_bottle_info($bottle_id);
		$message_list	 = $db->get_bottle_msg($bottle_id,0,$message_num_onepage);
		
		$bottle_list[$i] = array('bottle_info'=>$bottleinfo_list,'message_info'=>$message_list);
	}
	print_r(json_encode($bottle_list)); 
?>
